package com.example.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.domain.entity.Device;
import com.example.domain.entity.Provider;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.domain.entity.ProviderComplaint;
import com.example.domain.query.DeviceQuery;
import com.example.domain.query.ProviderQuery;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author baomidou
 * @since 2025-05-13
 */
@Service
public interface IProviderService extends IService<Provider> {

    IPage<Provider> pageQuery(ProviderQuery query, int pageNum, int pageSize);

    /**
     * 审核供应商
     */
    boolean audit(Integer providerId, Integer auditStatus, String auditComment, Integer auditorId);

    /**
     * 提交供应商投诉
     */
    boolean submitComplaint(ProviderComplaint complaint);

    /**
     * 更新供应商评级
     */
    boolean updateRating(Integer providerId, String rating, String reason, Integer operatorId);

    /**
     * 启用/禁用供应商
     */
    boolean toggleActive(Integer providerId, Boolean isActive);
}
